<?php

/**
 * Created by PhpStorm.
 * User: Pjan
 * Date: 16/7/12
 * Time: 下午5:00
 */
class user_money_config
{
    // 进货
    const RES_TYPE_PURCHASE = 2;

    // 白条支付自动返还
    const RES_TYPE_IOUS_RETURN = 10;

    // 取消订单返还
    const RES_TYPE_CANCEL_ORDER_SENDBACK = 11;

    // 合伙人订单余额扣减
    const RES_TYPE_MINUS = 13;

    // 充值
    const RES_TYPE_RECHARGE = 14;

    // 合伙人充值
    const RES_TYPE_DEALER_RECHARGE = 15;

    // 设备绑定返还
    const RES_TYPE_DEVICE_BIND_RETURN = 16;

    // 二级合伙人进货返还差价给一级合伙人
    const RES_TYPE_SUB_DEALER_RETURN_DIFF = 17;

    // 涉及相关钱的类型
    public static $money_type = array(
        '0' => '余额',
        '1' => '押金',
        '2' => '保证金',
    );

    public static function res_type_index() {
        return array_to_filelds_assoc('id', _model('user_money_type')->getList(array('status' => 1)));
    }
}